import jwt from 'jsonwebtoken'
import { jwtSecret } from '../config/auth'

/**
 * @author lihh
 * @description 生成token的方式
 * @param payload
 */
export const createToken = (payload: any) => {
  return jwt.sign(payload, jwtSecret, { expiresIn: '6h' })
}
